import requests

# 百度API配置
API_KEY = "ZWsM40uWHibmA6hu4nct354X"
SECRET_KEY = "dmJoOzQLISTBLooGcnxNsYaetBpfove0"

def get_access_token():
    """获取百度API access token"""
    host = f'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id={API_KEY}&client_secret={SECRET_KEY}'
    response = requests.get(host)
    return response.json().get('access_token') 